using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using DTO;
using BUS;
using Utility;
public partial class Admin_TinhTrangDeal_Detail : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            LoadData();
        }
    }
    private void LoadData()
    {
        try
        {
            String id = Request.QueryString["id"];
            tbCTDeal ct = tbCTDealBUS.GetByID(id);
            tbDeal deal = tbDealBUS.GetByID(ct.madeal.ToString());
            lit_Madeal.Text = deal.madeal;
            tbTinhTrangDeal tt = tbTinhTrangDealBUS.GetByID(ct.tinhtrangdeal);
            lit_Tinhtrang.Text = tt.tentt.ToString();
            tbHoaDon hd = tbHoaDonBUS.GetByID(ct.donhang);
            hd.mahd = int.Parse(lit_donhang.Text);
     
        }
        catch
        {
            Response.Redirect("~/Admin/TinhTrangDeal_List.aspx");
        }

    }
}
